<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面试</title>
    <style>
        .container{
            width: 500px;
            height: 500px;
            border: 1px solid #ccc;
            box-sizing: border-box;
        }
        .child{
            width: 100px;
            height: 100px;
            border: 1px solid #eff;
            background: red;
        }
    </style>
</head>
<body>
    <div class="container">
        <span>
            面试-垂直居中
            <!-- 1.display:flex;
                    justify-content:center;
                    align-items:center;
                2.position:absolute(不确定距离      )
                    top:45%
                    left:45%;
                3.transform:translate(-50%,-50%) -->
        </span> 
        <div class="child"></div>  
    </div>
</body>
</html>